package com.realife.eson.sensor;


import com.realife.eson.common.util.common.SpringBeanUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;


//@EnableFeignClients(basePackages = {"com.paas.bocloud.upms.*.api"})
//@EnableFeignClients(basePackages = {"*"})
@Slf4j
@EnableAspectJAutoProxy(proxyTargetClass = true)
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients
@EnableScheduling
@EnableAsync
@ComponentScan(basePackages = {"com.realife.eson.common","com.realife.eson.sensor"})
public class SensorRunApplication implements CommandLineRunner {


	public static void main(String[] args) {
		ConfigurableApplicationContext run = SpringApplication.run(SensorRunApplication.class, args);

		for (String beanDefinitionName : run.getBeanDefinitionNames()) {
			System.out.println("beanDefinitionName = " + beanDefinitionName);
		}
		System.out.println("run.getBeanDefinitionCount() = " + run.getBeanDefinitionCount());

		SpringBeanUtil.setApplicationContext(run);
	}


	@Override
	public void run(String... args) throws Exception {
		log.debug(">>>>>>>>>>>>>>> RunApplication 启动完成<<<<<<<<<<<<<");
	}


}
